package com.yeung.alo;

import java.util.Scanner;

/**
 * 标准调试程序
 * 网上编程的模板
 */
public class 求数列的和 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] inputs = new String[10];
        int index = 0;
/*        while (scanner.hasNextLine()) {
            inputs[index++] = scanner.nextLine();
        }*/
        String line = scanner.nextLine();
        while (!line.equals("")) {
            inputs[index++] = line;
            line = scanner.nextLine();
        }

        for (String input : inputs) {
            if (input != null) {
                String[] split = input.split(" ");
                int first = Integer.valueOf(split[0]);
                int count = Integer.valueOf(split[1]);
                double[] seq = new double[count];
                seq[0] = first;
                for (int i = 1; i < count; i++) {
                    seq[i] = Math.sqrt(seq[i - 1]);
                }
                double sum = 0;
                for (double v : seq) {
                    sum += v;
                }
                System.out.println(String.format("%.2f", sum));
            }
        }


    }

}
